<template>
	<form>
		<p>用户邮箱:<input type="text" name="email" v-model="email" /></p>
		<p>用户密码:<input type="text" name="password" v-model="password" /></p>
		<p><button type="submit" @click.prevent="login()">登录</button></p>
	</form>
</template>

<script>
	export default {
		name: "Login",
		data() {
			return {
				email: '',
				password: ''
			}
		},
		methods: {
			login() {
				if (this.email == 'zhangsan@163.com' && this.password == '123') {
					localStorage.setItem("apiKey", "123");
					this.$router.push("/home");
				}
			}
		}
	}
</script>

<style>
</style>
